#define _CRT_SECURE_NO_WARNINGS  1

class Solution {
public:
    int singleNumber(vector<int>& nums)
    {
        int n = 0;
        for (size_t i = 0; i < nums.size(); i++)
        {
            n ^= nums[i];
        }
        return n;
    }
};